package test;

public class Person {
    public String name="张无忌";
    protected String address="西安";
    String sex="男";
    private int age=20;

    public Person(){
        this.name="张无忌 ";   //调用本类的无参构造器
        this.address=" 陕西";
        this.sex="女";
        this.age= 10;
    }
     public Person(String name,String address){
        this();
        this.name=name;
        this.address=address;
    }

    public Person(String name,String address,String sex,int age){
        this.name=name;
        this.address=address;
        this.sex=sex;
        this.age=age;
    }

    public void sing(String singname){
        System.out.println(this.name+"在唱"+singname+"歌曲");

    }



}
